<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../../ohter/js库/mock.js"></script>
    <script src="../../ohter/js库/vue.js"></script>
    <title>css3盒子模型</title>
    <style>
        /* 
        css3盒子模型
            通过box-sizing来指定盒子模型 有两个值
                content-box 默认
                border-box 盒子大小为width padding+content+border=width 前提是boder padding不能超过width
         */
         div.pig {
            width: 200px;
            height: 200px;
            background-color: pink;
            border: 40px green solid;
            padding: 15px;
            box-sizing: content-box;
         }
         div.xz {
            width: 200px;
            height: 200px;
            background-color: yellow;
            
            border: 30px blue solid;
            padding: 15px;
            box-sizing: border-box;
         }
    </style>
</head>

<body>
    <div id="root">
        <div class="xz"></div>
        <div class="pig"></div>
    </div>
</body>
<script>
    new Vue({
        el: '#root',
        data() {
            return {
            }
        },
    })
</script>

</html>